﻿using System.Collections.Generic;
using UnityEngine;

public abstract class DynamicSaveCompAbs : MonoBehaviour
{
    public string prefabId;

    private void Start()
    {
        DynamicSaveManager.Instance.RegisterSaveable(this);
    }


    public abstract SerializableDic<string, object> SaveData();

    public abstract void LoadData(SerializableDic<string, object> data);

    private void OnDestroy()
    {
        DynamicSaveManager.Instance.UnregisterSaveable(this);
    }
}